﻿@using PagedList
@using PagedList.Mvc
@model PMKB_Repository.DisplayTag
@{
    ViewBag.Title = @PMKB_DAL.PMKBEntities_resource.Tag_List_Page_Title;
}
<h2>

    @PMKB_DAL.PMKBEntities_resource.Link_Found_Multi_Param(Model.links.TotalItemCount.ToString()) for <i><div id="divTag">@Model.tag.TagName</div></i> tag<sub><small><a href="javascript:renameTag('@Url.Action(MVC.Tag.RenameTag())',@Model.tag.TagID,'@Model.tag.TagName', function(name) { $('#divTag').html(name); })">rename</a></small></sub>
</h2>
<table>
    <thead>
        <tr>
            <th>
                Nr.
            </th>
            <th>
                 @PMKB_DAL.PMKBEntities_resource.Link_LinkName_Label
            </th>
            <th>
                @PMKB_DAL.PMKBEntities_resource.Link_LinkDescription_Label
            </th>
            <th>
                @PMKB_DAL.PMKBEntities_resource.Link_LinkUrl_Label
            </th>
            <th>
            @PMKB_DAL.PMKBEntities_resource.Tag_Name_Multi
                
            </th>
            <th>
                @PMKB_DAL.PMKBEntities_resource.Tag_Details
            </th>
            <th>
                @PMKB_DAL.PMKBEntities_resource.Tag_Actions
            </th>
        </tr>
    </thead>
    <tbody>
        @{int i = Model.links.FirstItemOnPage;}
        @foreach (var item in Model.links)
        {

            Html.RenderPartial(MVC.Shared.Views.Link_table, item, new ViewDataDictionary { new System.Collections.Generic.KeyValuePair<string, object>("nr", i) });
            i++;
        }
    </tbody>
</table>
@if (Model.links.PageCount > 1)
{ 
    @Html.PagedListPager(Model.links, page => Url.Action(MVC.Tag.Index(Model.tag.TagID.ToString(), page, Model.links.PageSize)), PagedListRenderOptions.PageNumbersOnly)
}

@Html.ActionLink(PMKB_DAL.PMKBEntities_resource.Link_Tag_List, MVC.Tag.List(1,10));